package com.scs.application.modules.purchase.service;

import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.purchase.dto.OrderItemByPackDTO;
import com.scs.application.modules.purchase.entity.OrderItem;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 订单明细 Service
 * </p>
 */

public interface OrderItemService extends IBaseService<OrderItem> {
    /**
     * 获取某段时间内的采购数量
     * @param startDate
     * @param endDate
     * @return
     */
    Double getSumSkuQty(String startDate, String endDate);

    /**
     * 获取某段时间内的采购金额
     *
     * @param startDate
     * @param endDate
     * @return
     */
    Double getSumAmount(String startDate, String endDate);

    /**
     * 跟台包采购：添加跟台包明细
     *
     * @param orderItemByPackDTO
     * @return
     */
    boolean addByPack(OrderItemByPackDTO orderItemByPackDTO);

    /**
     * 修改包装数量及主单金额，包金额
     *
     * @param orderItem
     * @return
     */
    boolean updateQty(OrderItem orderItem);

    /**
     * 删除跟台包采购明细
     *
     * @param id
     * @return
     */
    boolean deletePackage(String id);

    /**
     * 删除跟台包内耗材
     *
     * @param id
     * @return
     */

    boolean deleteMatr(String id);

    void saveBatchMatr(List<Serializable> matrIdList, String orderId);
}
